The 'Bad array index' error may occur in N4 version 4.0.13 when XPS starts up and the N4 yard includes a block from a previous N4 release. In XPS, the number of points that define boundaries is limited to 50 for block boundaries and 60 for yard boundaries. For example, if there are more than 50 points in a block, XPS logs the 'Bad array index' error.
Whenever the geometry of a block changes in Yard Editor, Yard Editor tries to minimize the points while saving the new geometry points. However, yard models with older data might have blocks with lots of points. For such blocks, try any of the following workarounds in Yard Editor:
Move the block slightly using the Modify Block tool. When done, disable the tool, then enable it again and move the block back to where it was before.
Edit or re-create the block's yard sections.
Right-click the block and select Regenerate Geometries.
Remove the block from the yard and then place it in the yard again as an existing block.
Export the yard model to SNX, manually change the model-name in the yard model .snx file to a new name, and then re-import the .snx file.
When your changes are completed, you must apply your changes to the active yard, which prompts a recalculation of the yard geometries (N4 Yard Editor Actions
Apply Yard Model Changes To Yard). If the slope difference between adjacent sides is less than 1/10th of a degree, then Yard Editor skips the point to prevent the yard file from including too many geometry points for a block.